<div>
  <span class="pull-right">
    <button class="layui-btn" onclick="add('{:url('admin/user_add')}','用户添加')">
      <i class="layui-icon">&#xe608;</i> 用户添加
    </button>
  </span>
</div>
<table class="layui-table">
  <colgroup>
    <col>
    <col>
    <col>
    <col>
  </colgroup>
  <thead>
    <tr>
      <th>用户</th>
      <th>用户组</th>
      <th>创建时间</th>
      <th>添加用户</th>
      <th>状态</th>
      <th>操作</th>
    </tr> 
  </thead>
  <tbody>
    {volist name="list" id="vo"}
      <tr>
        <td>{$vo.user}</td>
        <td>{$vo.catename}</td>
        <td>{$vo.create_time}</td>
        <td>{$vo.add_user}</td>
        <td>
          {if condition="$vo.id == 1"}
            <button class="layui-btn layui-btn-disabled layui-btn-small">已激活</button> 
          {else/}
            <button class="layui-btn layui-btn-primary layui-btn-small" onclick="state('user_state.html',{$vo.id},{state: {$vo.state}})"> 
              {if condition="$vo.state == 1"}
                <font style="color: blue">已激活</font>
              {else/}
                <font style="color: red">未激活</font> 
              {/if}     
            </button> 
          {/if}    
        </td>
        <td>
          {if condition="$vo.id == 1"}
            <div class="layui-btn-group">
              <button class="layui-btn  layui-btn-disabled layui-btn-small">
                <i class="layui-icon">&#xe642;</i>
              </button>
              <button class="layui-btn  layui-btn-disabled layui-btn-small">
                <i class="layui-icon">&#xe640;</i>
              </button>
            </div>  
          {else/}
            <div class="layui-btn-group">
              <button class="layui-btn layui-btn-primary layui-btn-small" onclick="edit('user_edit.html',{$vo.id})">
                <i class="layui-icon">&#xe642;</i>
              </button>
              <button class="layui-btn layui-btn-primary layui-btn-small" title="删除" onclick="del('user_del.html',{$vo.id})">
                <i class="layui-icon" style="color: red">&#xe640;</i>
              </button>            
            </div>
          {/if}
        </td>
      </tr>
    {/volist}
  </tbody>
</table>
